<?php
//include("conexion.php");
include("valida.php");
if($enviar){
if($rut==""||$nombre==""||$apellido==""||$clave==""||$mail==""){
echo '<div style="color:red;">Por favor ingrese todos los datos</div>';
}
	else{
	if (verificaremail($mail)!=true) {
         echo '<div style="color:red;">Email no valido</div>';
    }
	}
	
/*$select=mysql_query("INSERT INTO  `ventaEntrada`.`cliente` (
`Rut` ,
`Clave` ,
`Nombre` ,
`Apellido` ,
`IdCat` ,
`cantEntradas` ,
`Email`
)
VALUES (
'$rut',  '$clave',  '$nombre',  '$apellido',  '3', NULL ,  '$mail'
);");
if($select){
echo '<script>alert("Datos enviados")</script>';
}
else{
echo '<script>alert("Ocurrio un error")</script>';
}*/
}
?>

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Raccoon Sell</title>

    <!-- Bootstrap core CSS -->
    <link href="../css/bootstrap.css" rel="stylesheet">

    <!-- Add custom CSS here -->
    <link href="../css/small-business.css" rel="stylesheet">

    <link rel="stylesheet" type="text/css" href="../css/form.css">

  </head>

  <body>

    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <!-- You'll want to use a responsive image option so this logo looks good on devices - I recommend using something like retina.js (do a quick Google search for it and you'll find it) -->
          <a class="navbar-brand logo-nav" href="../index.php"><img src="../images/logo.png"></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse navbar-ex1-collapse">
          <ul class="nav navbar-nav navbar-right">
            <li><a href="#about">Acerca de nosotros</a></li>
            <li><a href="#contact">Contacto</a></li>
          </ul>
        </div><!-- /.navbar-collapse -->
      </div><!-- /.container -->
    </nav>

    <form style="width:380px;"class='contacto' method="post" action="" name="f_contacto">
    <label>Rut:</label>
    <input type='text' name="rut"><br>
    <label>Nombre:</label>
    <input type='text' name="nombre"><br>
    <label>Apellido:</label>
    <input type='text' name="apellido"><br>
    <label>Clave</label>
    <input type='password' name="clave"><br>
    <label>E-Mail:</label>
    <input type='text' name="mail"><br>
    <br><br>
    <input type='submit' value='Enviar' name="enviar">
    <input type='reset' value='Borrar'> 
    </form>

    <!-- Bootstrap core JavaScript -->
    <!-- Placed at the end of the document so the pages load faster -->
    <!-- Make sure to add jQuery - download the most recent version at http://jquery.com/ -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap.js"></script>
  </body>
</html>
